# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=biblesync
pkgver=2.1.0
pkgrel=3
pkgdesc='multicast shared co-navigation library for Bible programs'
arch=('loong64' 'x86_64')
url="https://github.com/karlkleinpaste/biblesync"
license=('custom')
makedepends=('cmake')
depends=('gcc-libs' 'util-linux-libs')
provides=('libbiblesync.so')
source=("$url/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('9083fcacc4d85f2b8c3a3254112129c02d940d20db8c0c5bcb6239b115e8d0e8')

build() {
  cmake -B build -S "$pkgname-$pkgver" \
    -DBUILD_SHARED_LIBS=TRUE \
    -DLIBDIR=/usr/lib \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 "$pkgname-$pkgver"/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
}
